<!--
 * @Author: early-autumn
 * @Date: 2020-05-25 19:44:37
 * @LastEditors: early-autumn
 * @LastEditTime: 2020-06-17 15:38:36
-->
<template>
  <el-form inline size="mini">
    <el-row>
      <el-col :span="6">
        <el-form-item label="姓名：">{{ patient.name }}</el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="年龄："> {{ patient.age }}</el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="性别：">{{ sexEnum[patient.sex] }}</el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="手机号："> {{ patient.phoneNumber }}</el-form-item>
      </el-col>
    </el-row>
    <el-row v-if="patient.isTemporary !== 0">
      <el-col :span="6">
        <el-form-item label="地址："
          >{{ `${patient.province} ${patient.city} ${patient.district}` }}
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="病历号："> {{ patient.caseNumber }}</el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="初诊日期：">
          {{ patient.firstDiagnoseTime }}
        </el-form-item>
      </el-col>
      <el-col :span="6">
        <el-form-item label="初诊医生："> {{ patient.doctor }}</el-form-item>
      </el-col>
    </el-row>
  </el-form>
</template>

<script>
import { sexEnum } from '@/utils/enums'

export default {
  name: 'DefaultPatient',
  props: {
    patient: {
      type: Object,
      default: () => ({}),
    },
  },
  computed: {
    sexEnum() {
      return sexEnum
    },
  },
}
</script>

<style></style>
